package com.smcdd.cdb.dbo.cdb_dbo.ui.utils;


import com.smcdd.cdb.dbo.cdb_dbo.service.entity.StoreInfo;
import com.smcdd.cdb.dbo.cdb_dbo.service.entity.StoreInfoV2;

import java.util.Comparator;

public class ZhangfenComparator implements Comparator<StoreInfo.DataBean> {

	public int compare(StoreInfo.DataBean o1, StoreInfo.DataBean o2) {

		try {

			if (Integer.parseInt(o2.getSub_count()) > Integer.parseInt(o1.getSub_count())) {
				return 1;
			}else if ((Integer.parseInt(o2.getSub_count()) == Integer.parseInt(o1.getSub_count()))) {
				return 0;
			}else {
				return -1;
			}
		}catch (Exception e){
			return  -1;
		}

//return o2.getSub_count().compareTo(o1.getSub_count());
	}
}
